package com.firewolf.struts.global.actions;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.firewolf.struts.global.beans.UserForm;

/**
 * 
 * @Description:
 * @Author: 刘兴
 * @Date : 2016年8月26日
 * @package : com.firewolf.struts.global.actions
 * @Java_Version : 1.7
 * @Version : 2016年8月26日下午2:21:40
 */
public class UserAction extends Action {

	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		UserForm userForm = (UserForm) form;
		if("123".equals(userForm.getPassword())){
			return mapping.findForward("ok");
		}
		return mapping.findForward("err");
	}
	
}
